package com.example.qxfw.nyqx.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qxfw.common.entity.ny.CropGrowdateHistory;
import com.example.qxfw.nyqx.vo.GrowdateHistoryListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
@DS("service")
public interface CropGrowdateHistoryMapper extends BaseMapper<CropGrowdateHistory> {

    @Select("select year, growdatedate " +
            "from crop_growdate_history " +
            "where year>=#{year1} and year<= #{year2} and stationid = '${stationId}' and type like '%${type}%' and cropname='${cropName}' and growdatename='${growDateName}' " +
            "order by year ")
    List<GrowdateHistoryListVo> selectList1(long year1, long year2, String stationId, String type, String cropName, String growDateName);
}
